package com.jk.web.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class InterceptorConfig implements WebMvcConfigurer {

   /* @Autowired
    private LoginInterceptor loginInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        // 添加一个拦截器，连接以/admin为前缀的 url路径
        registry.addInterceptor(loginInterceptor)
                .addPathPatterns("")
                .excludePathPatterns("/web/login")
                .excludePathPatterns("/web/toLogin")
                .excludePathPatterns("/web/toLogon")
                .excludePathPatterns("/web/logon")
                .excludePathPatterns("/verificationCode")
                .excludePathPatterns("/error")
                .excludePathPatterns("/css/**")
                .excludePathPatterns("/fonts/**")
                .excludePathPatterns("/js/**")
                .excludePathPatterns("/static/**")
                .excludePathPatterns("/img/**")
                .excludePathPatterns("/static/js/**")
                .excludePathPatterns("/html/**");
    }
*/
}
